package com.lancoo.znbkxx.teacher.help.adapter;

import android.os.Parcelable;

import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentStatePagerAdapter;

import org.jetbrains.annotations.NotNull;

import java.util.List;

/**
 * Created by Dadong on 2020/11/9
 * Describe:
 */
public class ZnbkPagerAdapter extends FragmentStatePagerAdapter {
    List<Fragment> list;

    public ZnbkPagerAdapter(FragmentManager fm, List list) {
        super(fm);
        this.list = list;
    }

    @NotNull
    @Override
    public Fragment getItem(int arg0) {
        return list.get(arg0);
    }

    @Override
    public int getCount() {
        return list.size();
    }

    //	public boolean canScrollVertically(int position, int direction) {
//        return  getItem(position).canScrollVertically(direction);
//    }
    @Override
    public Parcelable saveState() {
        return null;
    }
}